<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Mr.UBKey
 * Date: 30/10/2011
 * Time: 15:04
 * To change this template use File | Settings | File Templates.
 */
 class Product_ComponentController extends XPHP_Controller
 {
     public function categoryAction()
     {
         //Lấy ra danh mục sản phẩm đa cấp
         $model = new Areas_Product_Models_Category();
         $categories = $model->getCategoryMultiLevel(0);
         $this->view->categories = $categories;
         return $this->view();
     }

     public function newProductAction()
     {
         //Lấy ra các danh sách sản phẩm mới nhất
         $productModel = new Areas_Product_Models_Product();
         $products = $productModel->getLastestProduct(8);
         $this->view->products = $products;
         return $this->view();
     }
 }
